//
//  LDBaseCustomNavTabVC.swift
//  DingDongZP
//
//  Created by 三秒文化 on 16/7/29.
//  Copyright © 2016年 51ledian.com. All rights reserved.
//

import UIKit

class LDBaseCustomNavTabVC: UITableViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        
        view.backgroundColor = LDGolbalColor.BgGoundGray
        
        navigationController?.navigationBar.barTintColor = LDGolbalColor.Green
        navigationController?.navigationBar.tintColor = UIColor.whiteColor()
        //        navigationController?.navigationBar.translucent = true
        navigationController?.navigationBar.titleTextAttributes = [NSFontAttributeName : LDFont.Font16,NSForegroundColorAttributeName:LDGolbalColor.White]
        navigationController?.navigationBar.translucent = false
    }
    
    override func viewWillAppear(animated: Bool) {
        
        navigationController?.navigationBar.barTintColor = LDGolbalColor.Green
        navigationController?.navigationBar.tintColor = UIColor.whiteColor()
        //        navigationController?.navigationBar.translucent = true
        navigationController?.navigationBar.titleTextAttributes = [NSFontAttributeName : LDFont.Font16,NSForegroundColorAttributeName:LDGolbalColor.White]
        navigationController?.navigationBar.translucent = false
    }
    
    override func customBackItemWithTarget(target: AnyObject!, action: Selector) -> UIBarButtonItem! {
        
        let barLeft = UIBarButtonItem(image: UIImage(named:"navBack.png"), style: UIBarButtonItemStyle.Plain, target: self, action:#selector(self.navback))
        
        
        return barLeft
    }
    
    func navback() {
        
        self.navigationController?.popViewControllerAnimated(true)
    }
    
}
